<?php
$shid=@shmop_open(1,'a',0,0);//派车单锁
if(!$shid){
	$shid=shmop_open(1,'c',0666,1);
	shmop_write($shid, 0, 0);
}
shmop_close($shid);
$shid=@shmop_open(2,'a',0,0);//派车单锁
if(!$shid){
	$shid=shmop_open(2,'c',0666,10);
	shmop_write($shid, mktime(), 0);
}
shmop_close($shid);
return array(
	'sms_serial_port'=>'COM3',//gsm猫端口
	'sms_speed'=>7,//短信  每分钟 发送条数
	'adminEmail'=>'webmaster@example.com',
	'uploadFile'=>array('path'=>'/upload','tmpPath'=>'/upload/tmp',
						'driverPhotoPath'=>'/upload/driverPhoto','driverPhotoSize'=>200*1024,'driverPhotoExt'=>'*.jpg; *.jpeg; *.gif',
						'driverPhotoScript'=>'site/uploadedFiles'
					),
	'no_photo_path'=>'/img/no_photo.gif',
	'page_size'=>array('drivers'=>10,'users'=>10,'staff_info'=>10,'trucks'=>10,'path'=>10,'truck_to_repair'=>10,'tail_board'=>10,
					'consignor_info'=>10,'goods_name'=>10,'fuel_consumption'=>10,'constant_expense'=>10,'merit_pay_ratio'=>10,
					'consignee_info'=>10,'truck_type_info'=>10,'accident_record'=>10,'annual_verification'=>10,'vehicle_insurance'=>10,
					'schedule_list'=>10,'truck_appointment'=>10,'confirm_sheet'=>10,'grade_identification'=>10,'mandatory_maintenance'=>10,
					'truck_exam'=>10,'single_truck_exam'=>10,'merit_pay_collection'=>10,'gas_fee_stat_collection'=>10,'gas_fee_incentive_stat'=>10,
					'odometer_no'=>10,'staff_collection'=>10,'sms_queue'=>10,'manual_stat_log'=>10,'customer_name'=>10,'business_detail'=>10),
					
	'dialog'=>array('findDriverFroTruck'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>300),
					'findConsignorForGoodsName'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>300),
					'findTruckForToRepair'=>array('page_size'=>10,'maxButtonCount'=>5,'width'=>500,'height'=>400),
					'findTruckForConstantExpense'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>300),
					'findTruckForMeritRatio'=>array('page_size'=>10,'maxButtonCount'=>5,'width'=>600,'height'=>450),
					'findTruckForFuelConsumption'=>array('page_size'=>10,'maxButtonCount'=>5,'width'=>600,'height'=>450),
					'findTypeForMeritRatio'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>300),
					'findTruckForTailBoard'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>300),
					'findTypeForTailBoard'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>300),
					'findTruckForOdometerNo'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>300),
					'findStaffForCollection'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>300),
					'findTruckForAccident'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>300),
					'findDriverForAccident'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>300),
					'findTruckForVerification'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>300),
					'findTruckForIdentification'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>300),
					'findTruckForMandatory'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>300),
					'findTruckForVehicle'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>300),
					'findTruckBoardForMaintenance'=>array('page_size'=>10,'maxButtonCount'=>5,'width'=>600,'height'=>400),
					'findTruckForMaintenance'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>300),
					'findDriverForMaintenance'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>300),
					'findDonsignorForSchedule'=>array('page_size'=>10,'maxButtonCount'=>5,'width'=>600,'height'=>300),
					'findPathForSchedule'=>array('page_size'=>10,'maxButtonCount'=>5,'width'=>600,'height'=>400),
					'findGoodsNameForSchedule'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>400),
					'findCustomerForBusiness'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>400),
					//派车单
					'findTruckForAppointment'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>400),
					'findBoardForAppointment'=>array('page_size'=>10,'maxButtonCount'=>5,'width'=>600,'height'=>400),
					'findDriverForAppointment'=>array('page_size'=>10,'maxButtonCount'=>5,'width'=>600,'height'=>400),
					'findConsignorForAppointment'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>400),
					'findConsignorLinkmanForAppointment'=>array('page_size'=>10,'maxButtonCount'=>5,'width'=>600,'height'=>400),
					'findConsigneeForAppointment'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>400),
					'findConsigneeLinkmanForAppointment'=>array('page_size'=>10,'maxButtonCount'=>5,'width'=>600,'height'=>400),
					'findGoodsNameForAppointment'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>400),
					'findPathForAppointment'=>array('page_size'=>10,'maxButtonCount'=>5,'width'=>600,'height'=>400),
					//派车单结束
					//确认单
					'findTruckForConfirm'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>400),
					'findBoardForConfirm'=>array('page_size'=>10,'maxButtonCount'=>5,'width'=>600,'height'=>400),
					'findDriverForConfirm'=>array('page_size'=>10,'maxButtonCount'=>5,'width'=>600,'height'=>400),
					'findConsignorForConfirm'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>400),
					'findConsignorLinkmanForConfirm'=>array('page_size'=>10,'maxButtonCount'=>5,'width'=>600,'height'=>400),
					'findConsigneeForConfirm'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>400),
					'findConsigneeLinkmanForConfirm'=>array('page_size'=>10,'maxButtonCount'=>5,'width'=>600,'height'=>400),
					'findGoodsNameForConfirm'=>array('page_size'=>20,'maxButtonCount'=>5,'width'=>600,'height'=>400),
					'findPathForConfirm'=>array('page_size'=>10,'maxButtonCount'=>5,'width'=>600,'height'=>400),
					//确认单结束
					),
					
	'delete_constraint'=>array(//删除基本信息关联提示
					'drivers'=>array(
								array('table_name'=>'车辆信息','table'=>'Trucks','fk_index'=>'fk_driver_id','other'=>"state=0"),
					),
					'trucks'=>array(
								array('table_name'=>'尾板信息','table'=>'Trucks','fk_index'=>'fk_truck_id','other'=>"state=0 and kind=1"),
								array('table_name'=>'待修车辆','table'=>'Truck_to_repair','fk_index'=>'fk_truck_id','other'=>"state=0"),
								array('table_name'=>'标准油耗信息','table'=>'Fuel_consumption','fk_index'=>'fk_truck_id','other'=>"state=0"),
								array('table_name'=>'绩效工资考核系数','table'=>'Merit_pay_ratio','fk_index'=>'fk_truck_id','other'=>"state=0"),
								array('table_name'=>'月固定费用','table'=>'Constant_expense','fk_index'=>'fk_truck_id','other'=>"state=0"),
					),
					'tail_board'=>array(
								array('table_name'=>'待修车辆','table'=>'Truck_to_repair','fk_index'=>'fk_truck_id','other'=>"state=0"),
					),
					'truck_type_info'=>array(
								array('table_name'=>'车辆信息','table'=>'Trucks','fk_index'=>'fk_type_id','other'=>"state=0 and kind=0"),
								array('table_name'=>'尾板信息','table'=>'Trucks','fk_index'=>'fk_type_id','other'=>"state=0 and kind=1"),
								array('table_name'=>'标准油耗信息','table'=>'Fuel_consumption','fk_index'=>'fk_type_id','other'=>"state=0"),
								array('table_name'=>'绩效工资考核系数','table'=>'Merit_pay_ratio','fk_index'=>'fk_type_id','other'=>"state=0"),
					),
				),
	'unit_name'=>array('0'=>'车 ','1'=>'托', '2'=>'吨 ','3'=>'方', '4'=>'吨公里', '5'=>'其他'),//计算标准	
	'driving_circuit'=>array(0=>'高速',1=>'国道',2=>'辅路',3=>'市内'),//行驶线路
	'fuel_consumption'=>array('front_driving'=>'车头空驶','empty_driving'=>'空驶','light_driving'=>'轻驶','heavy_driving'=>'重驶'),//标准油耗
	'reminder_id'=>'reminder',//提醒页面id
	'search_schedule_id'=>'t1001',//查询计划单窗口id
	'update_schedule_id'=>'t1002',//更新计划单窗口id			
	'create_app_id'=>'t1010',//派车单窗口id
	'search_app_id'=>'t1011',//查询派车单窗口id
	'update_app_id'=>'t1012',//更新派车单窗口id						
	'create_confirm_id'=>'t1022',//确认派车单窗口id
								

	'auth_operation'=>array(1=>array('添加','create'),2=>array('查询','search'),3=>array('修改','admin')),			
	'auth'=>array('基本信息模块'=>array(
			'drivers'=>array('code'=>'01','name'=>'司机信息','default_operation'=>true),
			'trucks'=>array('code'=>'02','name'=>'车辆信息','default_operation'=>true),
			'tail_board'=>array('code'=>'03','name'=>'尾板信息','default_operation'=>true),
			'truck_type_info'=>array('code'=>'04','name'=>'车型信息','default_operation'=>true),
			'path'=>array('code'=>'05','name'=>'线路信息','default_operation'=>true),
			'consignor_info'=>array('code'=>'06','name'=>'货主(发货人)','default_operation'=>true),
			'consignee_info'=>array('code'=>'07','name'=>'客户(收货人)','default_operation'=>true),
			'goods_name'=>array('code'=>'08','name'=>'货物名称信息','default_operation'=>true),
			'staff_info'=>array('code'=>'09','name'=>'员工信息','default_operation'=>true),
			'truck_to_repair'=>array('code'=>'10','name'=>'待修车辆','default_operation'=>true),
			'constant_expense'=>array('code'=>'11','name'=>'月固定费用','default_operation'=>true),
			'fuel_consumption'=>array('code'=>'12','name'=>'标准油耗','default_operation'=>true),
			'merit_pay_ratio'=>array('code'=>'13','name'=>'绩效工资','default_operation'=>true),
			'odometer_no'=>array('code'=>'14','name'=>'车表公里数','default_operation'=>true),),	
			'营运模块'=>array(	
			'schedule_list'=>array('code'=>'15','name'=>'作业计划单','default_operation'=>true),
			'truck_appointment'=>array('code'=>'16','name'=>'派车单','default_operation'=>true),
			'confirm_sheet'=>array('code'=>'17','name'=>'确认派车单','operation'=>array(1=>array('确认','create'),2=>array('查询','search'),3=>array('修改','admin'))),
			'site'=>array('code'=>'18','name'=>'司机短信群发','operation'=>array(1=>array('发送短信','add_sms'),2=>array('发送记录','search_sms'))),),
			'结算模块'=>array(
			'statistics'=>array('code'=>'19','name'=>'车辆考核汇总','operation'=>array(
				1=>array('查询','truck_exam'),
				2=>array('查询','single_truck_exam','show'=>false),
				3=>array('查询','merit_pay','show'=>false),
				4=>array('查询','gas_coll','show'=>false),
				5=>array('查询','gas_incentive','show'=>false),
				6=>array('统计','time_statistics','show'=>false),
				7=>array('查询','manual_stat_log','show'=>false)
				)),
			'dckh'=>array('code'=>'19','name'=>'单车考核','operation'=>array(2=>array('查询','single_truck_exam'))),
			'sjjx'=>array('code'=>'19','name'=>'司机绩效汇总','operation'=>array(3=>array('查询','merit_pay'))),
			'yhtj'=>array('code'=>'19','name'=>'油耗统计汇总','operation'=>array(4=>array('查询','gas_coll'))),
			'yhjc'=>array('code'=>'19','name'=>'油耗奖惩','operation'=>array(5=>array('查询','gas_incentive'))),
			'sdydtj'=>array('code'=>'19','name'=>'手动月度统计','operation'=>array(6=>array('手动统计','time_statistics'))),
			'sdydtjrz'=>array('code'=>'19','name'=>'手动月度统计日志','operation'=>array(7=>array('查询','manual_stat_log'))),	
			//'qtyw'=>array('code'=>'20','name'=>'其他业务','default_operation'=>true),
			'staff_collection'=>array('code'=>'21','name'=>'员工月工作评比','default_operation'=>true),),
			'车辆费用模块'=>array(		
			'vehicle_insurance'=>array('code'=>'22','name'=>'保险费用','default_operation'=>true),
			'accident_record'=>array('code'=>'23','name'=>'交通事故记录','default_operation'=>true),
			'annual_verification'=>array('code'=>'24','name'=>'年审费用','default_operation'=>true),
			'grade_identification'=>array('code'=>'25','name'=>'营运证等级鉴定','default_operation'=>true),
			'mandatory_maintenance'=>array('code'=>'26','name'=>'营运证强制保养','default_operation'=>true),
			'ordinary_maintenance'=>array('code'=>'27','name'=>'日常维修费用','default_operation'=>true),),
			'用户管理模块'=>array(	
			'users'=>array('code'=>'28','name'=>'用户信息','default_operation'=>true),),
			'其他业务模块'=>array(	
			'customer_name'=>array('code'=>'29','name'=>'客户信息','default_operation'=>true),
			'business_detail'=>array('code'=>'30','name'=>'业务信息','default_operation'=>array(
				1=>array('添加','create'),
				2=>array('查询','search'),
				3=>array('修改','admin'),
				4=>array('查询','monthly_statistics','show'=>false),
				5=>array('查询','annual_statistics','show'=>false),
				)),
			'ytjb'=>array('code'=>'30','name'=>'月统计表','operation'=>array(4=>array('查询','monthly_statistics'))),
			'ntjb'=>array('code'=>'30','name'=>'年统计表','operation'=>array(5=>array('查询','annual_statistics'))),	
			),
		),					
);
?>